#include<stdio.h>
#include<conio.h>
int a[]={1};
int b[]={1, 2};
int c[]={1, 2, 3};
int d[]={1, 2, 3, 4};
int f[]={3, 3, 4, 4};
int g[]={3, 2, 3, 4};
int h[]={4, 1, 2, 3};
int i[]={1, 1};
int tinh(int a[],int n)
{
     int i,kq;
     kq=0;
     for(i=0;i<n;i++)
     if(a[i]%2!=0) kq+=a[i];
     else kq-=a[i];
     return kq;
     }
main()
{
      int n;
      n=sizeof(a)/sizeof(a[1]);
      printf("\n%d",tinh(a,n));
      n=sizeof(b)/sizeof(b[1]);
      printf("\n%d",tinh(b,n));
      n=sizeof(c)/sizeof(c[1]);
      printf("\n%d",tinh(c,n));
      n=sizeof(d)/sizeof(d[1]);
      printf("\n%d",tinh(d,n));
      n=sizeof(f)/sizeof(f[1]);
      printf("\n%d",tinh(f,n));
      n=sizeof(g)/sizeof(g[1]);
      printf("\n%d",tinh(g,n));
      n=sizeof(h)/sizeof(h[1]);
      printf("\n%d",tinh(h,n));
      n=sizeof(i)/sizeof(i[1]);
      printf("\n%d",tinh(i,n));
      getch();
      }
